export default {
  props: {
    attrName: {
      required: true
    },
    dataForm: {
      required: true
    },
    placeholder: {
      type: String
    },
    beforeSubmitFunc: {
      type: Function
    },
    dataLoadedFunc: {
      type: Function
    }
  },
  data() {
    return {}
  },
  methods: {
    // submit 之前触发
    beforeSubmit() {
      this.beforeSubmitFunc(this)
    },
    // 数据加载完成后触发
    dataLoaded() {
      this.dataLoadedFunc(this)
    },
    forceUpdate(){
      this.$forceUpdate()
    }
  }
}
